Skip to content

refactor capi stage and targz target#4159

Open
dtrawins wants to merge 1 commit intomainfrom
dockerfile-refactor
Open

refactor capi stage and targz target#4159
dtrawins wants to merge 1 commit intomainfrom
dockerfile-refactor

Conversation

@dtrawins
Copy link
Copy Markdown
Collaborator

@dtrawins dtrawins commented Apr 24, 2026

🛠 Summary

This is productization of #3967

CVS-185012 Image building refactor to address issues for RedHat base OS on Konflux system.
Bazel command is in a single layer to avoid issues with passing bazel cache between layers.
It also speeds up build when release docker image is the only needed artefact, skipping capi stage.

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

Copilot AI review requested due to automatic review settings April 24, 2026 12:24
@dtrawins dtrawins requested review from atobiszei and removed request for Copilot April 24, 2026 12:27
Comment thread create_package.sh
mkdir -p /ovms_pkg/${BASE_OS}
cd /ovms_pkg/${BASE_OS}
tar czf ovms.tar.gz --transform 's/ovms_release/ovms/' /ovms_release/
sha256sum ovms.tar.gz > ovms.tar.gz.sha256 && \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this removed?

Comment thread Dockerfile.redhat
Comment on lines -274 to -276
# prebuild dependencies before copying sources
# hadolint ignore=DL3059
RUN bazel build --jobs=$JOBS ${debug_bazel_flags} //:ovms_dependencies @com_google_googletest//:gtest
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing all those steps will mean that all those dependencies are not cached in docker layers up until L321:
https://github.com/openvinotoolkit/model_server/pull/4159/changes#diff-507d73bbefd62da3db1eec3a006d6f4bf47433fec017a5299f63921bd0a605b0L321
So basically that means they are never cached in docker. With bazel remote cache that would not be an issue but in every other case its mean recompiling most of ovms dependencies each time anything in our srcs change (L281).

Unless proven empirically that those dependencies recompile anyway, its a no go for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants